<template>
	<!-- 提现记录 -->
	<view class="page">
		<c-scroll-list :api="api" @load="load">
			<view class="list" v-for="(v,i) in list" :key="i">
				<view class="list_l">
					<view class="name">提现：{{$fn.twoToFixed(v.amount)}}</view>
					<view class="date">{{$fn.parseTime(v.createTime)}}</view>
				</view>
				<view v-if="v.actionStatus==0" class="list_r c1">待审核</view>
				<view v-else-if="v.actionStatus==1" class="list_r c2">已提现</view>
				<view v-else-if="v.actionStatus==2" class="list_r c3">提现驳回</view>
			</view>
		</c-scroll-list>
	</view>
</template>

<script>
	export default {
		name: "withdrawRecord",
		data() {
			return {
				api: this.$api.getWithdrawRecord,
				list: []
			};
		},
		onLoad() {
			uni.setNavigationBarColor({
				backgroundColor: '#FFFFFF',
				frontColor: '#000000'
			})
		},
		onShow() {},
		methods: {
			load(res) {
				this.list = res.list
			}
		}
	};
</script>
<style>
	page {
		background: #F7F7F7;
	}
</style>
<style lang="scss" scoped>
	.page {
		.list {
			width: 710rpx;
			background: #FFFFFF;
			border-radius: 12rpx;
			margin: 20rpx auto 0;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 24rpx 20rpx;
			box-sizing: border-box;

			.list_l {
				.name {
					font-weight: bold;
					font-size: 32rpx;
					color: #1A1A1A;
				}

				.date {
					font-weight: 400;
					font-size: 24rpx;
					color: #999999;
					margin-top: 24rpx;
				}
			}

			.list_r {
				font-weight: bold;
				font-size: 28rpx;
			}

			.c1 {
				color: #FF8040;
			}

			.c2 {
				color: #4D94FF;
			}

			.c3 {
				color: #EF4630;
			}
		}
	}
</style>